package com.code.AZPlan.model.po;

import com.code.commons.model.po.BasePO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Id;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * AZ钱包PO及持久层对象
 *
 * @author tangyifei
 * @since 2020年1月7日11:43:55
 */
@ApiModel("AZ钱包PO及持久层对象")
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
public class AZPlanWallet extends BasePO<String> {

    private static final long serialVersionUID = 7375126252104755734L;

    @ApiModelProperty(value = "主键", example = "1")
    @Id
    @Length(min = 1, max = 64)
    private String id;

    @ApiModelProperty(value = "用户主键", example = "1")
    @NotBlank(message = "用户主键不能为空")
    @Length(min = 1, max = 64)
    private String userId;

    @ApiModelProperty(value = "币种类型", example = "XWC")
    @NotBlank(message = "币种类型不能为空")
    private String coinType;

    @ApiModelProperty(value = "相关币种的金额", example = "0.00")
    @NotNull(message = "相关币种的金额不能为空")
    private BigDecimal amount;

    @ApiModelProperty(value = "版本号", example = "0")
    @NotNull(message = "版本号不能为空")
    private Integer version;

}
